using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public partial class ArchivePage : FuncPage
{
    private List<ArchiveBlank_Page> m_ArchiveBlank_Pages;
    private bool m_IsReadArchive;
    
    public ArchivePage(bool isRead)
    {
        m_IsReadArchive = isRead;
    }
    protected override void Init()
    {
        base.Init();

        m_ArchiveBlank_Pages = new List<ArchiveBlank_Page>();

        for(int i = 0; i < m_ArchiveBlankRectTransform.childCount; i++)
        {
            ArchiveBlank_Page newArvhiveBlank = new ArchiveBlank_Page();

            newArvhiveBlank.Bind(m_ArchiveBlankRectTransform.GetChild(i) as RectTransform, m_IsReadArchive);

            m_ArchiveBlank_Pages.Add(newArvhiveBlank);
        }
    }

    public override void OnEnable()
    {
        base.OnEnable();

        for(int i = 0; i < m_ArchiveBlank_Pages.Count; i++)
        {
            m_ArchiveBlank_Pages[i].OnEnable();
        }
    }

    public override void OnDisable()
    {
        base.OnDisable();

        for (int i = 0; i < m_ArchiveBlank_Pages.Count; i++)
        {
            m_ArchiveBlank_Pages[i].OnDisable();
        }
    }
}
